home *** CD-ROM | disk | FTP | other *** search
/ New Perspectives on Computer Concepts / New Perspectives on Computer Concepts.iso / np2010c / page771.pag < prev    next >
Portable Network Graphic  |  2008-10-02  |  69KB  |  817x1045  |  8-bit (256 colors)
Labels: chat room | hakham | laptop | monitor
OCR: COMPUTER PROGRAMMING 703 How doI define the classes Ineed to solve a problem? When taking the object- t-oriented approach to a problem, one of the first steps is to identify the objects that pertain toa solution. As you might expect the solu- tion to the pizza problem requires some pizza objects Certain characteristics of i pizzas provide information necessary to solve the TERMINOLOGY NOTE problem. This information- -the price size and shape of a pizza- -provides the structure for the Pizza class. class is defined by attributes and meth- The data types used to ods. class attribute defines the characteristics of set of objects. You will define class attributes are learn about methods which define actions, later in this section. similar to the data types Each class the attribute Pizza typica ...